﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TouchDriver.Data
{
    public class Record
    {
        public Location loc1 = new Location();
        public Location loc2 = new Location();

        public Record()
        {
        }
        public Record(int x1, int y1, int x2, int y2)
        {
            loc1.x = x1;
            loc1.y = y1;
            loc2.x = x2;
            loc2.y = y2;
        }

        public int x1
        {
            get
            {
                return loc1.x;
            }
            set
            {
                loc1.x = value;
            }
        }

        public int y1
        {
            get
            {
                return loc1.y;
            }
            set
            {
                loc1.y = value;
            }
        }

        public int x2
        {
            get
            {
                return loc2.x;
            }
            set
            {
                loc2.x = value;
            }
        }

        public int y2
        {
            get
            {
                return loc2.y;
            }
            set
            {
                loc2.y = value;
            }
        }

        public bool Valid
        {
            get { return loc1.Valid || loc2.Valid;}
        }
    }
}
